#include "ParkMiller.h"


PMrng::PMrng(unsigned int seed){
	this->seed = seed;
	a = 16807;
	m = 2147483647;
}

unsigned int PMrng::getNext(){
	seed = (unsigned long(seed * a)) % m;
	return seed;
}

unsigned int PMrng::getNext(int min, int max){
	seed = (unsigned long(seed * a)) % m;
	return seed % (max - min + 1) + min;
}